package com.indusfo.spc.mapper;

import com.indusfo.spc.pojo.Dep;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface DepMapper {

    //查询编码重复与否
    Integer repeat(@Param("lDepId") Integer lDepId, @Param("vcDepCode") String vcDepCode);

    //查询名称重复与否
    Integer repeatName(@Param("lDepId") Integer lDepId, @Param("vcDepName") String vcDepName);


    //新增
    Integer insertDepts(Dep dept);

    //修改
    Integer updateDepts(Dep dept);

    //删除
    Integer deleteDepts(Dep dept);

    //查询
    List<Dep> lookDepts(Dep dept);

    //查询条数
    Integer tallys(Dep dept);
    //通过上级部门ID查询子部门数
    Integer lookDeptsBylDepPar(Dep dept);

    // 判断部门编号是否更改
    Integer judgeDepCode(Dep dept);

    // 查询子类ID
    List<Integer> queryChild(@Param("depId") Integer depId);
}
